package com.yan.design.two.behavior.s4;

/**
 * 4. 迭代器模式
 *     测试类
 * @author shengren.yan
 * @create 2022-08-09
 */
public class testRun {

    public static void main(String[] args) {

        String[] str = new String[]{"A","B","C"};
        ArrayCollection<String> of = ArrayCollection.of(str);
        System.out.println(of);
        System.out.println("-----------");

        // 自定义的集合 - 也可以遍历
        of.forEach(x->{
           System.out.println(x);
        });
    }

}
